<template>
  <div>
    <el-form class="input-form"
      label-position="right"
      label-width="120px"
      ref="editForm"
      :rules="propRules"
      :disabled="propReadonly"
      :model="form"
    >
                    <el-row :gutter="20">
      <el-col :span="12">
        <el-form-item label="his收费流水号" prop="hisKey">
          <el-input v-model="form.hisKey" />
        </el-form-item>
      </el-col>
                      <el-col :span="12">
        <el-form-item label="收费项目代码（HIS中唯一字段）" prop="matrCodeHis">
          <el-input v-model="form.matrCodeHis" />
        </el-form-item>
      </el-col>
          </el-row>
                    <el-row :gutter="20">
      <el-col :span="12">
        <el-form-item label="状态：0:耗材 1:药品 " prop="billType">
          <el-input v-model="form.billType" />
        </el-form-item>
      </el-col>
                      <el-col :span="12">
        <el-form-item label="唯一码，有的话为高值" prop="sn">
          <el-input v-model="form.sn" />
        </el-form-item>
      </el-col>
          </el-row>
                    <el-row :gutter="20">
      <el-col :span="12">
        <el-form-item label="收费价格" prop="price">
          <el-input v-model="form.price" />
        </el-form-item>
      </el-col>
                      <el-col :span="12">
        <el-form-item label="收费数量" prop="qty">
          <el-input v-model="form.qty" />
        </el-form-item>
      </el-col>
          </el-row>
                    <el-row :gutter="20">
      <el-col :span="12">
        <el-form-item label="消耗科室代码（病人所属科室）" prop="deptCodePatient">
          <el-input v-model="form.deptCodePatient" />
        </el-form-item>
      </el-col>
                      <el-col :span="12">
        <el-form-item label="开单科室代码(手术室,介入室等)" prop="deptCodeOp">
          <el-input v-model="form.deptCodeOp" />
        </el-form-item>
      </el-col>
          </el-row>
                    <el-row :gutter="20">
      <el-col :span="12">
        <el-form-item label="记账日期" prop="billDate">
          <el-date-picker v-model="form.billDate" type="date" :format="dates.defaultDatePattern"  :picker-options="dates.pickerOptions.date" />
        </el-form-item>
      </el-col>
                      <el-col :span="12">
        <el-form-item label="手术单号" prop="oprtCode">
          <el-input v-model="form.oprtCode" />
        </el-form-item>
      </el-col>
          </el-row>
                    <el-row :gutter="20">
      <el-col :span="12">
        <el-form-item label="患者代码（HIS系统中唯一）" prop="patientCode">
          <el-input v-model="form.patientCode" />
        </el-form-item>
      </el-col>
                      <el-col :span="12">
        <el-form-item label="是否是耗材" prop="flagMatr">
          <el-input v-model="form.flagMatr" />
        </el-form-item>
      </el-col>
          </el-row>
                    <el-row :gutter="20">
      <el-col :span="12">
        <el-form-item label="备注" prop="remark">
          <el-input v-model="form.remark" />
        </el-form-item>
      </el-col>
                      <el-col :span="12">
        <el-form-item label="" prop="creator">
          <el-input v-model="form.creator" />
        </el-form-item>
      </el-col>
          </el-row>
                    <el-row :gutter="20">
      <el-col :span="12">
        <el-form-item label="" prop="gmtCreate">
          <el-date-picker v-model="form.gmtCreate" type="date" :format="dates.defaultDatePattern"  :picker-options="dates.pickerOptions.date" />
        </el-form-item>
      </el-col>
                      <el-col :span="12">
        <el-form-item label="" prop="modifier">
          <el-input v-model="form.modifier" />
        </el-form-item>
      </el-col>
          </el-row>
                    <el-row :gutter="20">
      <el-col :span="12">
        <el-form-item label="" prop="gmtModified">
          <el-date-picker v-model="form.gmtModified" type="date" :format="dates.defaultDatePattern"  :picker-options="dates.pickerOptions.date" />
        </el-form-item>
      </el-col>
                      <el-col :span="12">
        <el-form-item label="计费人" prop="execUser">
          <el-input v-model="form.execUser" />
        </el-form-item>
      </el-col>
          </el-row>
    </el-form>
  </div>
</template>

<script>

export default {
  data() {
    return {
      form: {},
      viewData: {}
    }
  },
  methods: {  },
  created() {
    this.$emit('event-register', {
      validate: (callback) => {
        this.$refs.editForm.validate(callback)
      },
      beforeSave: () => {
        this.$emit('data-callback', this.form)
        return true
      },
      afterMove: (formData, initData) => {
        this.form = global.utils.jsonClone(formData)

        // 设置switch 元素默认值
      },
      afterSave: () => {  },
      beforeDelete: () => {
        return true
      },
      afterDelete: () => {
      },
      beforeFlow: (flowButtonKey) => {
        return true
      },
      afterFlow: (flowButtonKey) => {
      },
      beforeClose: () => {
        return true
      }
    })
  },
  props: {
    propParent: Object,
    propInitData: Object,
    propPrimaryKey: String,
    propDictionaries: Object,
    propCurrentRow: Object,
    propViewFormData: Object,
    propReadonly: Boolean,
    propStatus: String,
    propRules: Object
  },
  components: {
  },
  computed: {
  }
}
</script>

<style lang="scss" scoped>
  .container {
    width: 100%;
    height: 100%;
  }
</style>
